package web.response;
import constants.enums.Result;
import lombok.Data;

@Data
/**
 * controller层返回前端数据
 */
public class ResultBody {
    private Integer resCode;
    private String resMsg;
    private Object data;

    public ResultBody(String s, String msg, boolean checkPower) {
        super();
    }

    public ResultBody(Integer resCode) {
        super();
        this.resCode = resCode;
        this.resMsg = Result.getMsgByCode(resCode);

    }

    public ResultBody(Integer resCode, String resMsg) {
        super();
        this.resCode = resCode;
        this.resMsg = resMsg;
    }

    public ResultBody(Integer resCode, String resMsg, Object data) {
        super();
        this.resCode = resCode;
        this.resMsg = resMsg;
        this.data = data;
    }
}
